//
//  GeneralsettingTableViewController.m
//  新浪微博
//
//  Created by hbl on 16/3/10.
//  Copyright © 2016年 hbl. All rights reserved.
//

#import "GeneralsettingTableViewController.h"
#import "MBProgressHUD+MJ.h"
#import "FMDatabase.h"
#import "SDWebImageManager.h"
@interface GeneralsettingTableViewController ()

@end

@implementation GeneralsettingTableViewController

- (void)group1
{
    BLGroup *group = [[BLGroup alloc]init];
    BLItem *cleanCache = [BLItem ItemWithTitle:@"清除缓存" subTitle:nil icon:nil number:nil option:^{
        NSFileManager *manager = [NSFileManager defaultManager];
        NSString *cachePath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) lastObject];
        NSString *sqlPath = [cachePath stringByAppendingPathComponent:@"wb.sql"];
        [manager removeItemAtPath:sqlPath error:nil];
        
        [[SDWebImageManager sharedManager].imageCache clearDisk];
        
        [MBProgressHUD showSuccess:@"清除成功！"];
       
    } destClass:nil type:BLItemTypeNO];
    
    group.Items = @[cleanCache];
    [self.groups addObject:group];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    [self group1];
  }

@end